//体重数据方法  1是短线  2是中线也就是 10 20..  3是长线 5 15...
export  function weightMethods(){
  let weightEnd = 145
  let weight = []
  for(let i =0;i<=weightEnd; i++){
    let amount = i +5
    let json = {'id':i,'amount':amount,name:"体重",unit:"kg"}
    if((i%10) == 0){
        json.type = 2
    }else if((i%10) ==5 && (i%5) ==0){
        json.type = 3
    }else{
        json.type = 1
    }
    weight.push(json)

  }
  //console.log(weight)
  return weight

}

// 身高数据
export function heightMethods(){
  let heightEnd = 200
  let height = []
  for(let i =0;i<=heightEnd; i++){
     let amount = i + 20
    let json = {id:i,'amount':amount,name:"身高",unit:"cm"}
    if((i%10) == 0){
        json.type = 2
    }else if((i%10) ==5 && (i%5) ==0){
        json.type = 3
    }else{
        json.type = 1
    }
    height.push(json)

  }
  //console.log(height)
  return height
}

//年份数据
export function yearMrthods(){
  let date = new Date()
  let yearEnd = date.getFullYear()
  let yearStart = yearEnd - 30
  let data = []
  let id = 0
  for(let i = 0;i<30;i++){
    let year = yearStart + i
    for(let k = 1;k<=12;k++){
      let json = {'id':id,'name':"出生年",'amount':year}
      id ++
        if(k == 1){
          json.type = 3
        }else if(k == 6){
           json.type = 2
        }else{
          json.type = 1
        }
        json.unit = k + "月"
        data.push(json)
    }
  }
  //console.log(data)
  return data
}
